<div class="refentry" title="glPointSize"><a id="glPointSize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glPointSize — specify the diameter of rasterized points</p></div><div class="refsynopsisdiv" title="C Specification"><h2>C Specification</h2><div class="funcsynopsis"><table class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">glPointSize</b>(</code></td><td>GLfloat <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">glPointSizex</b>(</code></td><td>GLfixed <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Parameters"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term">
                    <em class="parameter"><code>size</code></em>
                </span></dt><dd><p>Specifies the diameter of rasterized points. The
                    initial value is 1.</p></dd></dl></div></div><div class="refsect1" title="Description"><a id="description"></a><h2>Description</h2><p><code class="function">glPointSize</code>
        specifies the rasterized diameter of both aliased and
        antialiased points. Using a point size other than 1 has
        different effects, depending on whether point antialiasing is
        enabled. To enable and disable point antialiasing, call
        <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
        and
        <a class="citerefentry" href="glDisable"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>
        with argument
        <code class="constant">GL_POINT_SMOOTH</code>.
        Point antialiasing is initially disabled.</p><p>If point antialiasing is disabled, the actual size is
        determined by rounding the supplied size to the nearest
        integer. (If the rounding results in the value 0, it is as if
        the point size were 1.) If the rounded size is odd, then the
        center point
        <math overflow="scroll">
            <mfenced><mi>x</mi><mi>y</mi></mfenced>
        </math>
        of the pixel fragment that represents the point is computed
        as</p><div class="informalequation"><math overflow="scroll">
            <mfenced>
                <mrow>
                    <mo>[</mo>
                    <msub><mi>x</mi><mi>w</mi></msub>
                    <mo>]</mo>
                    <mo>+</mo>
                    <mfrac><mn>1</mn><mn>2</mn></mfrac>
                </mrow>
                <mrow>
                    <mo>[</mo>
                    <msub><mi>y</mi><mi>w</mi></msub>
                    <mo>]</mo>
                    <mo>+</mo>
                    <mfrac><mn>1</mn><mn>2</mn></mfrac>
                </mrow>
            </mfenced>
        </math></div><p>where <em class="replaceable"><code>w</code></em>
        subscripts indicate window coordinates. All pixels that lie
        within the square grid of the rounded size centered at
        <math overflow="scroll">
            <mfenced><mi>x</mi><mi>y</mi></mfenced>
        </math>
        make up the fragment. If the size is even, the center point
        is</p><div class="informalequation"><math overflow="scroll">
            <mfenced>
                <mrow>
                    <mo>[</mo>
                    <msub><mi>x</mi><mi>w</mi></msub>
                    <mo>+</mo>
                    <mfrac><mn>1</mn><mn>2</mn></mfrac>
                    <mo>]</mo>
                </mrow>
                <mrow>
                    <mo>[</mo>
                    <msub><mi>y</mi><mi>w</mi></msub>
                    <mo>+</mo>
                    <mfrac><mn>1</mn><mn>2</mn></mfrac>
                    <mo>]</mo>
                </mrow>
            </mfenced>
        </math></div><p>and the rasterized fragment's centers are the
        half-integer window coordinates within the square of the
        rounded size centered at
        <math overflow="scroll">
            <mfenced><mi>x</mi><mi>y</mi></mfenced>
        </math>.
        All pixel fragments produced in rasterizing a nonantialiased
        point are assigned the same associated data, that of the vertex
        corresponding to the point.</p><p>If antialiasing is enabled, then point rasterization
        produces a fragment for each pixel square that intersects the
        region lying within the circle having diameter equal to the
        current point size and centered at the point's
        <math overflow="scroll">
            <mfenced>
                <msub><mi>x</mi><mi>w</mi></msub>
                <msub><mi>y</mi><mi>w</mi></msub>
            </mfenced>
        </math>.
        The coverage value for each fragment is the window
        coordinate area of the intersection of the circular region with
        the corresponding pixel square. This value is saved and used in
        the final rasterization step. The data associated with each
        fragment is the data associated with the point being
        rasterized.</p><p>Not all sizes are supported when point antialiasing is
        enabled. If an unsupported size is requested, the nearest
        supported size is used. Only size 1 is guaranteed to be
        supported; others depend on the implementation. To query the
        range of supported sizes, call
        <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with the argument
        <code class="constant">GL_SMOOTH_POINT_SIZE_RANGE</code>.
        For aliased points, query the supported ranges
        <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with the argument
        <code class="constant">GL_ALIASED_POINT_SIZE_RANGE</code>.</p></div><div class="refsect1" title="Notes"><a id="notes"></a><h2>Notes</h2><p>A non-antialiased point size may be clamped to an
        implementation-dependent maximum. Although this maximum cannot
        be queried, it must be no less than the maximum value for
        antialiased points, rounded to the nearest integer
        value.</p></div><div class="refsect1" title="Errors"><a id="errors"></a><h2>Errors</h2><p>
        <code class="constant">GL_INVALID_VALUE</code> is generated if
        <em class="parameter"><code>size</code></em> is less than or equal to 0.</p></div><div class="refsect1" title="Associated Gets"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
        <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with argument <code class="constant">GL_ALIASED_POINT_SIZE_RANGE</code></p><p>
        <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with argument <code class="constant">GL_SMOOTH_POINT_SIZE_RANGE</code></p></div><div class="refsect1" title="See Also"><a id="seealso"></a><h2>See Also</h2><p>
        <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
        <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        </p></div><div class="refsect1" title="Copyright"><a id="copyright"></a><h2>Copyright</h2><p>
            Copyright © 2003-2004
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div>
